package com.my.admin.api;

import com.my.admin.service.FriendLinkService;
import com.my.admin.util.Rest;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api(value = "友人帐接口", tags = "友人帐接口")
@RestController
@RequestMapping("api")
@CrossOrigin
public class FriendLinkApiController {

    @Autowired
    private FriendLinkService service;

    @GetMapping("friendLink")
    public Rest friendLink() {
        return Rest.ok().setData("list", service.list());
    }

}
